#!/bin/bash
# *****************************************************************************
# Starts the connect web server.
# 
# *****************************************************************************


pushd "`dirname "$0"`"

cd ".."
pwd

echo "Current Java:"
java -version

CLASSPATH="bin:lib/jetty903/jetty-continuation-9.0.3.v20130506.jar:lib/jetty903/jetty-http-9.0.3.v20130506.jar:lib/jetty903/jetty-io-9.0.3.v20130506.jar:lib/jetty903/jetty-security-9.0.3.v20130506.jar:lib/jetty903/jetty-server-9.0.3.v20130506.jar:lib/jetty903/jetty-servlet-9.0.3.v20130506.jar:lib/jetty903/jetty-util-9.0.3.v20130506.jar:lib/jetty903/jetty-xml-9.0.3.v20130506.jar:lib/jetty903/servlet-api-3.0.jar:etc:lib/common-1.0.1.jar:lib/commons-beanutils-1.8.3.jar:lib/commons-collections-3.2.1.jar:lib/commons-digester-1.6.jar:lib/commons-fileupload-1.2.2.jar:lib/commons-io-2.0.1.jar:lib/commons-lang-2.5.jar:lib/commons-logging-1.1.1.jar:lib/cubedata-1.0.5.jar:lib/ezmorph-1.0.6.jar:lib/freemarker.jar:lib/js-14.jar:lib/js.jar:lib/json-lib-2.4-jdk15.jar:lib/log4j-1.2.15.jar:lib/jdbc/mysql-connector-java-5.1.26-bin.jar" 

OPTS="$OPTS -Dfile.encoding=UTF-8"
OPTS="$OPTS -Dsun.jnu.encoding=UTF-8" 
OPTS="$OPTS -cp $CLASSPATH"

# Start the server
java -server "-Xms512m" "-Xmx1024m" $OPTS com.binarycube.webserver.WebServer

popd




